package com.itrip.common.constants;

import lombok.Getter;

/**
 * @author helen
 * @since 2019/6/24
 */
@Getter
public enum ResultCodeEnum {

	SUCCESS(true, 20000,"成功"),
	UNKNOWN_REASON(false, 20001, "未知错误"),
	BAD_SQL_GRAMMAR(false, 21001, "sql语法错误"),
	JSON_PARSE_ERROR(false, 21002, "json解析异常"),
	PARAM_ERROR(false, 21003, "参数不正确"),
	URL_ENCODE_ERROR(false, 23001, "URL转码错误"),
	ILLEGAL_CALLBACK_REQUEST_ERROR(false, 23002, "非法回调参数错误"),
	FETCH_ACCESS_TOKEN_ERROR(false, 23003, "获取授权码错误"),
	FETCH_USER_INFO_ERROR(false, 23004, "获取微信用户信息错误"),
	USERLOGIN_INVALID_ERROR(false, 30006, "登录信息过期，请重新登录"),
	AUTH_PARAMETER_ERROR(false,3001,"用户或者密码错误"),
	AUTH_TOKEN_INVALID(false,3000,"token无效"),
	USERUNLOGIN_ERROR(false, 21008, "用户未登录，请重新登录");


	private Boolean success;//响应是否成功
	private Integer code;//返回码
	private String message;//返回消息

	ResultCodeEnum(Boolean success, Integer code, String message) {
		this.success = success;
		this.code = code;
		this.message = message;
	}
}
